package com.xlh.dao.courseTest;

import com.xlh.pojo.courseTest.ExperimentReport;
import com.xlh.pojo.courseTest.ExperimentReportExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ExperimentReportMapper {

    long countByExample(ExperimentReportExample example);

    int deleteByExample(ExperimentReportExample example);

    int deleteByPrimaryKey(Long id);

    int insert(ExperimentReport record);

    int insertSelective(ExperimentReport record);

    List<ExperimentReport> selectByExampleWithBLOBs(ExperimentReportExample example);

    List<ExperimentReport> selectByExample(ExperimentReportExample example);

    ExperimentReport selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") ExperimentReport record, @Param("example") ExperimentReportExample example);

    int updateByExampleWithBLOBs(@Param("record") ExperimentReport record, @Param("example") ExperimentReportExample example);

    int updateByExample(@Param("record") ExperimentReport record, @Param("example") ExperimentReportExample example);

    int updateByPrimaryKeySelective(ExperimentReport record);

    int updateByPrimaryKeyWithBLOBs(ExperimentReport record);

    int updateByPrimaryKey(ExperimentReport record);
    Integer insertExperimentTimeVideoOther(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("videotime") String videotime, @Param("stepId") Long stepId, @Param("taskId") Long taskId, @Param("videoSumTime") String videoSumTime);

    Integer insertExperimentTime(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("pass") Integer pass);
    Integer updateExperimentTime(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("pass") Integer pass);
    Integer updateExperimentTimeVideo(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("videotime") String videotime, @Param("stepId") Long stepId, @Param("taskId") Long taskId);

    Integer findQueryExperimentById(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId);
    Map<String ,Object> findQueryExperimentByTask(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("taskId") Long taskId, @Param("stepId") Long stepId);

    List<Map<String ,Object>> queryExperimentPass(@Param("courseId") Long courseId, @Param("classId") Long classId, @Param("userIds") List<Long> userIds);
    void deleteExperimentVideo(@Param("courseId") Long courseId, @Param("chapterId") Long chapterId, @Param("classId") Long classId, @Param("userId") Long userId, @Param("taskId") Long taskId, @Param("stepId") Long stepId);
    List<Map<String ,Object>> queryExperimentStudyTime(@Param("userIds") List<Long> userIds, @Param("chapterId") Long chapterId);
    List<Map<String ,Object>> queryExperimentVideoTime(@Param("classId") Long classId, @Param("chapterId") Long chapterId, @Param("courseId") Long courseId);

}